home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Tools / Languages / MacHaskell 2.2 / com / cmu / savesys < prev   
Encoding:
Text File  |  1994-09-27  |  2.2 KB  |  52 lines  |  [TEXT/ttxt]

  1. d 3) (safety 0) (debug 0) (ext:inhibit-warnings 3)))
  2. (setf *load-verbose* nil)
  3. (setf *compile-verbose* nil)
  4. (in-package :mumble-user)
  5. (gc-messages '#f)
  6. (setf *printers* '(compiling loading prompt))
  7. (setf *compile-interface* '#f)
  8. ;;; Load the prelude.
  9. (compile/load *prelude-unit-filename*)
  10. ;;; Set up the saved system.
  11. (setf *modules-loaded* '())
  12. (define (haskell-toplevel)
  13.   (use-vanilla-interface)
  14.   (load-init-files)
  15.   (let* ((argv  (getenv "HASKELLARGS"))
  16.          (args  (if argv (parse-command-args-top argv) '())))
  17.     (if (null? args)
  18.     (do () ('#f)
  19.           (lisp:with-simple-restart (restart-haskell "Restart Haskell.")
  20.             (heval)))
  21.         (lisp:with-simple-restart (restart-haskell "Exit Haskell.")
  22.           (hrun (car args) (cdr args))))))
  23. (define (restart-haskell)
  24.   (lisp:invoke-restart 'restart-haskell))
  25. (define (haskell-debugger-hook c f)
  26.   (declare (ignore f))
  27.   (if *haskell-debug-in-lisp*
  28.       (begin
  29.         (when *haskell-enter-debugger-hook*
  30.           (funcall *haskell-enter-debugger-hook*))
  31.         (lisp:unwind-protect (lisp:invoke-debugger c)
  32.           (when *haskell-exit-debugger-hook*
  33.             (funcall *haskell-exit-debugger-hook*))))
  34.       (begin
  35.         (format '#t "Lisp error:~%~a~%" c)
  36.         (haskell-backtrace)
  37.         (when *haskell-compilation-error-hook*
  38.           (funcall *haskell-compilation-error-hook*))
  39.         (format '#t "Restarting Haskell...~%")
  40.         (restart-haskell))))
  41. (setf lisp:*debugger-hook* (function haskell-debugger-hook))
  42. (ext:save-lisp "bin/new-cmu-haskell.core"
  43.   :purify '#t
  44.   :root-structures '()
  45.   :init-function 'haskell-toplevel
  46.   :load-init-file '#f
  47.   :site-init '#f
  48.   :print-herald '#f
  49.   )
  50. (ext:quit)
  51. EOF
  52.